import request from '@/utils/request'

// 查询交通违规信息列表
export function listViolation(query) {
    return request({
        url: '/server/violation/list',
        method: 'get',
        params: query
    })
}

// 查询交通违规信息详细
export function getViolation(violationId) {
    return request({
        url: '/server/violation/' + violationId,
        method: 'get'
    })
}

// 新增交通违规信息
export function addViolation(data) {
    return request({
        url: '/server/violation',
        method: 'post',
        data: data
    })
}

// 修改交通违规信息
export function updateViolation(data) {
    return request({
        url: '/server/violation',
        method: 'put',
        data: data
    })
}

// 删除交通违规信息
export function delViolation(violationId) {
    return request({
        url: '/server/violation/' + violationId,
        method: 'delete'
    })
}

// 导出交通违规信息
export function exportViolation(query) {
    return request({
        url: '/server/violation/export',
        method: 'get',
        params: query
    })
}
